﻿@{
  ViewData["Title"] = "Home Page";
}

<div class="container">
  <div class="text-center">
    <h1>Amazon Web Services</h1>
    <h2>Subscribe, publish, and translate example</h2>
  </div>

  <div class="row">
    <div class="col-md-12 mx-auto">
      <p>
        This example uses the AWS SDK for .NET. to use Amazon Simple
        Notification Service (Amazon SNS) and Amazon Translate to allow
        users to subscribe, unsubscribe, and translate message for an
        Amazon SNS queue.
      </p>
    </div>
  </div>

  <div class="row">
    <div class="col-md-4 mx-auto">
      <p><strong>To subscribe:</strong></p>
      <ol>
        <li>Enter a valid email address and then choose the <em>Subscribe</em> button.</li>
        <li>The sample application subscribes to the endpoint by using the SNS .NET API.</li>
      </ol>
      <p><strong>To unsubscribe:</strong></p>
      <ol>
        <li>Enter a valid email address and then choose the <em>Unsubscribe</em> button.</li>
        <li>The sample application unsubscribes from the endpoint by using the SNS .NET API.</li>
      </ol>
      <p>To view the email addresses subscribed to the queue, choose the <em>List Subscriptions</em> button.</p>
    </div>
    <div class="col-md-8 mx-auto">
      <h3>Enter an email address</h3>
      <input type="email" class="form-control" id="inputEmail1" aria-describedby="emailHelp" placeholder="Enter email">
      <div class="clearfix mt-2">
        <button type="button" class="btn btn-primary" onclick="subEmail() ">
          Subscribe
        </button>
        <button type="button" class="btn btn-primary" onclick="subscribe()">
          List Subscriptions
        </button>
        <button type="button" class="btn btn-primary" onclick="delSub()">
          UnSubscribe
        </button>
      </div>
    </div>
  </div>

  <hr style="width:50%;margin-left:auto;margin-right:auto;">

  <div class="row">
    <div class="col-md-4 mx-auto">
      <p><strong>To publish a message:</strong></p>
      <ol>
        <li>Enter the message you want to send.</li>
        <li>Select the language: English, French, or Spanish.</li>
        <li>Select the <em>Publish</em> button.</li>
      </ol>
    </div>
    <div class="col-md-8 mx-auto">
      <h3>Enter a message to publish</h3>
      <div class="control-group">
        <div class="form-group">
          <textarea class="form-control" id="body" rows="5" placeholder="Body" required="required" data-validation-required-message="Please enter a description."></textarea>
          <p class="help-block text-danger"></p>
        </div>
      </div>
      <div class="clearfix mt-2">
        <label for="lang">Select a Language:</label>
        <select name="lang" id="lang">
          <option>English</option>
          <option>French</option>
          <option>Spanish</option>
        </select>
        <button type="submit" class="btn btn-primary" id="SendButton">Publish</button>
      </div>
    </div>
  </div>

  <!-- Modal -->
  <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLongTitle" aria-hidden="true">
    <div class="modal-dialog" role="document">
      <div class="modal-content">
        <div class="modal-header">
          <h5 class="modal-title" id="exampleModalLongTitle">SNS Email Subscriptions</h5>
          <button type="button" class="close" data-dismiss="modal" aria-label="Close">
            <span aria-hidden="true">&times;</span>
          </button>
        </div>
        <div class="modal-body">

        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
        </div>
      </div>
    </div>
  </div>
</div>
